home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-10-20 | 1.7 KB | 107 lines | [FORM/VMSB] |
- MacStandardBasic Form Version 3.0
-
- FormBegin
- Name=Form1
- Title=Spiral Demo
- Left=101
- Top=69
- Width=417
- Height=416
- Sub Proc.=Form1_Event
- Visible=1
- Style=8
- Font=Geneva
- FontSize=12
- FontStyle=0
- Show Grid=1
- Grid Snap=1
- Grid Size=8
- Min. Width=100
- Max. Width=2000
- Min. Height=100
- Max. Height=2000
- AutoCenter=0
- ForeColor=0 0 0
- BackColor=65535 65535 65535
- FormEnd
-
- Start
- Dim A
-
- CreateTheMenus
- Form Form1
- CreateTheSpiral WinNum( Form1 )
-
- A=0
- Do While A=0
- Loop
- Finish
-
- Sub CreateTheMenus( )
- MenuApple
- MenuAddItem 1, "About Spiral Demo", "", AboutTheApp
- MenuDesk
- MenuAdd 2, "File", None
- MenuAddItem 2, "Page Setup...","", PgSetup
- MenuAddItem 2, "Print...", "P",PrintTheSpiral
- MenuAddItem 2, "Quit", "Q", QuitTheApp
-
- EndSub
-
- Sub QuitTheApp( )
- End
- EndSub
-
- Sub AboutTheApp( )
- Dim a
- a = MsgBox ("Spiral Demo"+chr(13)+"ZCurve Software", 0)
- EndSub
-
- Sub Form1_Event( )
-
-
-
- EndSub
-
- Sub CreateTheSpiral( GfxDevice)
- Dim f#, g#, h#, pi2#, x1, y1, x2, y2
-
- pi2 = 3.14*2
- h = pi2/31
- SetColor GfxDevice, 7
- For f = 0 to pi2 Step h
- For g = 0 to pi2 step h
- x1 = sin(f)*190.0
- y1 = cos(f)*190.0
- x2 = sin(g)*190.0
- y2 = cos(g)*190.0
- Line GfxDevice, x1+200, y1+200, x2+200, y2+200
- Next g
- Next f
-
- EndSub
-
- Sub PgSetup( )
- Dim A
-
- A = PageSetup()
-
-
- EndSub
-
- Sub PrintTheSpiral( )
- Dim A
-
- A = PrintSetup()
- If A = 1 Then
- Events 0
- PrintOpen
- CreateTheSpiral PRN
- PrintClose
- Events 1
- EndIf
-
-
- EndSub
-
-